<?php


namespace App\Http\Controllers\admin\validate;


use Illuminate\Support\Facades\Validator;

class Control
{


    public static function queryBatchName($param){
        $rules = [
            'userId'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addTeacherBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'address'=>'required',
            'type'=>'required|numeric',
            'bId'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'bId.required'=>'班级编号为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTeacherBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdTeacherBrowser($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editTeacherBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'address'=>'required',
            'type'=>'required|numeric',
            'bId'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'bId.required'=>'班级编号为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteTeacherBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryParentBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addParentBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'address'=>'required',
            'type'=>'required|numeric',
            'snValue'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'snValue.required'=>'sn码为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdParentBrowser($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editParentBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'address'=>'required',
            'type'=>'required|numeric',
            'snValue'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'snValue.required'=>'sn码为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteParentBrowser($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addTeacherAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'pakName'=>'required',
            'bId'=>'required',
            'address'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'pakName.required'=>'包名为空',
            'bId.required'=>'班级为空',
            'address.required'=>'网址为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTeacherAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdTeacherAppGround($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editTeacherAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'address'=>'required',
            'pakName'=>'required',
            'bId'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'pakName.required'=>'包名为空',
            'bId.required'=>'班级为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteTeacherAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addParentAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'pakName'=>'required',
            'snValue'=>'required',
            'address'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'pakName.required'=>'包名为空',
            'snValue.required'=>'sn码为空',
            'address.required'=>'网址为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryParentAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdParentAppGround($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editParentAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'address'=>'required',
            'pakName'=>'required',
            'snValue'=>'required'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'pakName.required'=>'包名为空',
            'snValue.required'=>'sn码为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteParentAppGround($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTeacherAppStart($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editTeacherAppStart($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'type'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryParentAppStart($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editParentAppStart($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'type'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTeacherAppInside($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdTeacherAppInside($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editTeacherAppInside($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryParentAppInside($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdParentAppInside($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editParentAppInside($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function importTfMedia($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'file'=>'required|file',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'file.required'=>'文件为空',
            'file.file'=>'文件格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addTfMedia($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'format'=>'required',
            'typeId'=>'required',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'format.required'=>'格式为空',
            'typeId.required'=>'分类为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTfMedia($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdTfMedia($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editTfMedia($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'format'=>'required',
            'typeId'=>'required',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'format.required'=>'格式为空',
            'typeId.required'=>'分类为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteTfMedia($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryPakName($param){
        $rules = [
            'userId'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'编号为空',
            'userId.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTypeTfMedia($param){
        $rules = [
            'type'=>'required|numeric',
        ];
        $msg = [
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addTeacherSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'bId'=>'required',
            'setting_call'=>'required',
            'setting_memory'=>'required',
            'setting_usb'=>'required',
            //'setting_bluetooth'=>'required',
            'setting_navigation'=>'required',
            'setting_statusbar'=>'required',
            'setting_tfmedia'=>'required',
            'setting_phone'=>'required',
            'setting_camera'=>'required',
            'setting_clock'=>'required',
            'setting_recording'=>'required',
            'setting_music'=>'required',
            'setting_picture'=>'required',
            'setting_wallpaper'=>'required',
            'setting_file'=>'required',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP为空',
            'lastIp.ip'=>'IP格式不对',
            'bId.required'=>'批次id为空',
            'setting_call.required'=>'电话通话功能为空',
            'setting_memory.required'=>'扩展存储卡为空',
            'setting_usb.required'=>'usb为空',
            //'setting_bluetooth.required'=>'蓝牙文件传输功能为空',
            'setting_navigation.required'=>'系统导航条为空',
            'setting_statusbar.required'=>'状态栏显示为空',
            'setting_tfmedia.required'=>'TF卡存储影音娱乐管控为空',
            'setting_phone.required'=>'电话白名单为空',
            'setting_camera.required'=>'摄像头为空',
            'setting_clock.required'=>'时钟功能管控为空',
            'setting_recording.required'=>'录音功能管控为空',
            'setting_music.required'=>'音乐功能管控为空',
            'setting_picture.required'=>'图库功能管控为空',
            'setting_wallpaper.required'=>'壁纸功能管控为空',
            'setting_file.required'=>'文件管理功能管控为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryTeacherSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdTeacherSetting($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editTeacherSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'bId'=>'required',
            'setting_call'=>'required',
            'setting_memory'=>'required',
            'setting_usb'=>'required',
            //'setting_bluetooth'=>'required',
            'setting_navigation'=>'required',
            'setting_statusbar'=>'required',
            'setting_tfmedia'=>'required',
            'setting_phone'=>'required',
            'setting_camera'=>'required',
            'setting_clock'=>'required',
            'setting_recording'=>'required',
            'setting_music'=>'required',
            'setting_picture'=>'required',
            'setting_wallpaper'=>'required',
            'setting_file'=>'required',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'lastIp.required'=>'IP为空',
            'lastIp.ip'=>'IP格式不对',
            'bId.required'=>'批次id为空',
            'setting_call.required'=>'电话通话功能为空',
            'setting_memory.required'=>'扩展存储卡为空',
            'setting_usb.required'=>'usb为空',
            //'setting_bluetooth.required'=>'蓝牙文件传输功能为空',
            'setting_navigation.required'=>'系统导航条为空',
            'setting_statusbar.required'=>'状态栏显示为空',
            'setting_tfmedia.required'=>'TF卡存储影音娱乐管控为空',
            'setting_phone.required'=>'电话白名单为空',
            'setting_camera.required'=>'摄像头为空',
            'setting_clock.required'=>'时钟功能管控为空',
            'setting_recording.required'=>'录音功能管控为空',
            'setting_music.required'=>'音乐功能管控为空',
            'setting_picture.required'=>'图库功能管控为空',
            'setting_wallpaper.required'=>'壁纸功能管控为空',
            'setting_file.required'=>'文件管理功能管控为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteTeacherSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function addParentSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'snName'=>'required',
            'setting_call'=>'required',
            'setting_memory'=>'required',
            'setting_usb'=>'required',
            //'setting_bluetooth'=>'required',
            'setting_navigation'=>'required',
            'setting_statusbar'=>'required',
            'setting_tfmedia'=>'required',
            'setting_phone'=>'required',
            'setting_camera'=>'required',
            'setting_clock'=>'required',
            'setting_recording'=>'required',
            'setting_music'=>'required',
            'setting_picture'=>'required',
            'setting_wallpaper'=>'required',
            'setting_file'=>'required',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP为空',
            'lastIp.ip'=>'IP格式不对',
            'snName.required'=>'设备名称为空',
            'setting_call.required'=>'电话通话功能为空',
            'setting_memory.required'=>'扩展存储卡为空',
            'setting_usb.required'=>'usb为空',
            //'setting_bluetooth.required'=>'蓝牙文件传输功能为空',
            'setting_navigation.required'=>'系统导航条为空',
            'setting_statusbar.required'=>'状态栏显示为空',
            'setting_tfmedia.required'=>'TF卡存储影音娱乐管控为空',
            'setting_phone.required'=>'电话白名单为空',
            'setting_camera.required'=>'摄像头为空',
            'setting_clock.required'=>'时钟功能管控为空',
            'setting_recording.required'=>'录音功能管控为空',
            'setting_music.required'=>'音乐功能管控为空',
            'setting_picture.required'=>'图库功能管控为空',
            'setting_wallpaper.required'=>'壁纸功能管控为空',
            'setting_file.required'=>'文件管理功能管控为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryParentSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'type'=>'required|numeric',
            'startSize'=>'required|numeric',
            'pageSize'=>'required|numeric'
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'type.required'=>'类型为空',
            'type.numeric'=>'类型格式不对',
            'startSize.required'=>'当前页为空',
            'startSize.numeric'=>'当前页格式不对',
            'pageSize.required'=>'页面显示数为空',
            'pageSize.numeric'=>'页面显示数格式不对'
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function queryIdParentSetting($param){
        $rules = [
            'id'=>'required|numeric',
        ];
        $msg = [
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function editParentSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
            'snName'=>'required',
            'setting_call'=>'required',
            'setting_memory'=>'required',
            'setting_usb'=>'required',
            //'setting_bluetooth'=>'required',
            'setting_navigation'=>'required',
            'setting_statusbar'=>'required',
            'setting_tfmedia'=>'required',
            'setting_phone'=>'required',
            'setting_camera'=>'required',
            'setting_clock'=>'required',
            'setting_recording'=>'required',
            'setting_music'=>'required',
            'setting_picture'=>'required',
            'setting_wallpaper'=>'required',
            'setting_file'=>'required',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
            'lastIp.required'=>'IP为空',
            'lastIp.ip'=>'IP格式不对',
            'snName.required'=>'设备名称为空',
            'setting_call.required'=>'电话通话功能为空',
            'setting_memory.required'=>'扩展存储卡为空',
            'setting_usb.required'=>'usb为空',
            //'setting_bluetooth.required'=>'蓝牙文件传输功能为空',
            'setting_navigation.required'=>'系统导航条为空',
            'setting_statusbar.required'=>'状态栏显示为空',
            'setting_tfmedia.required'=>'TF卡存储影音娱乐管控为空',
            'setting_phone.required'=>'电话白名单为空',
            'setting_camera.required'=>'摄像头为空',
            'setting_clock.required'=>'时钟功能管控为空',
            'setting_recording.required'=>'录音功能管控为空',
            'setting_music.required'=>'音乐功能管控为空',
            'setting_picture.required'=>'图库功能管控为空',
            'setting_wallpaper.required'=>'壁纸功能管控为空',
            'setting_file.required'=>'文件管理功能管控为空',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }

    public static function deleteParentSetting($param){
        $rules = [
            'userId'=>'required|numeric',
            'lastIp'=>'required|ip',
            'id'=>'required|numeric',
        ];
        $msg = [
            'userId.required'=>'用户编号为空',
            'userId.numeric'=>'用户编号格式不对',
            'lastIp.required'=>'IP地址为空',
            'lastIp.ip'=>'IP地址格式不对',
            'id.required'=>'编号为空',
            'id.numeric'=>'编号格式不对',
        ];
        return Validator::make($param,$rules,$msg)->errors()->all();
    }
}